import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os

plt.rcParams['font.sans-serif'] = ['SimHei']  # 显示中文
plt.rcParams['axes.unicode_minus'] = False
path_A = r"E:\大四下学期\毕业设计\数据\数据\A相接地"
for file in os.listdir(path_A):
    data = pd.read_csv(os.path.join(path_A, file), header=None, index_col=0, delim_whitespace=True,
                       )
    plt.plot(data.iloc[:, 3])
    plt.show()
# fig, ax = plt.subplots(2, 3, sharex='col', squeeze=True)
# ax = ax.flatten()
# for i, ax_ in enumerate(ax):
#     ax_.plot(data.iloc[10001-200:, 0], data.iloc[10001-200:, i+1])
# plt.show()
